<template>
  <el-switch
    v-model="val"
    :active-color="attrs.activeColor || '#13ce66'"
    :inactive-color="attrs.inactiveColor || '#cccccc'"
    :active-text=" attrs.activeText || ''"
    :inactive-text="attrs.inactiveText || ''">
  </el-switch>
</template>

<script>
export default {
  name: 'MsuiSwitch',
  props: {
    attrs: {
      type: Object,
      default: () => {
        return {}
      }
    },
    value: {
      default : 1
    }
  },
  computed: {
    val: {
      get() {
        return this.value ? true : false
      },
      set(val) {
        this.$emit('input', val)
      }
    }
  }
};
</script>